<el-dialog :title="title" class="dialogStyleBase" width="800px" :visible.sync="boxVisible" append-to-body
    :before-close="editBoxCancel">
    <div class="dialogStyleBaseBox">
        <el-form ref="editForm" :model="form" label-width="200px" label-position="left">

            <LayoutCell>
                <LayoutCellItem :title="packageTitle(item)" v-for="(item,index) of form.list" :key="index">

                    <el-form-item label="配送方式">
                        <el-radio-group v-model="item.isNeedLogistics">
                            <el-radio :label="1">需要物流</el-radio>
                            <el-radio :label="0">无需物流</el-radio>
                        </el-radio-group>
                    </el-form-item>
                    <el-form-item label="物流公司" v-if="item.isNeedLogistics">
                        <div class="deliveryWrap">
                            <span style="width:160px">
                                <el-form-item :prop="`list[${index}].companyId`"
                                    :rules="{ required: true, message: '物流公司不能为空'}">
                                    <el-select v-model="item.companyId">
                                        <el-option :label="item2.companyName" :value="item2.id"
                                            v-for="(item2,index2) in logisticsOptions" :key="item.id"></el-option>
                                    </el-select>
                                </el-form-item>
                            </span>
                            <span class="inputWrap">
                                <el-form-item :prop="`list[${index}].deliveryNo`"
                                    :rules="{ required: true, message: '快递单号不能为空'}">
                                    <el-input placeholder="请输入快递单号" v-model="item.deliveryNo" clearable>
                                    </el-input>
                                </el-form-item>
                            </span>

                        </div>
                    </el-form-item>

                </LayoutCellItem>


            </LayoutCell>


        </el-form>
    </div>
    <div slot="footer">
        <el-button @click="editBoxCancel()">取 消</el-button>
        <el-button type="primary" @click="submit()">确定</el-button>
    </div>
</el-dialog>